package com.bw.controller;

import com.bw.entity.User;
import com.bw.service.UserService;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Created by qpx on 2018/5/11.
 */
@Controller
public class TestController {
    @Autowired
    UserService userService;


    @RequestMapping("/test")
    public String test(ModelMap modelMap){

        List<User> users = userService.selectByCondition(new User());
        modelMap.put("users",users);
        return "test";
    }
}
